﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class OnButtonEvent : MonoBehaviour
{

    public string onClick = "";
    private Button btn = null;

    void Start()
    {
        this.btn = this.GetComponent<Button>();
        if (btn != null)
        {
            btn.onClick.AddListener(OnClick);
        }
    }

    void Update()
    {

    }

    void OnClick()
    {
        MonoBehaviour.print("on Click Event");
        if (this.onClick != "")
        {
            LuaHelper.getLuaModule().callScript(onClick, "");
        }
    }
}
